/*******************************************************************************
* Copyright (c) 2010, 2018 西安秦晔信息科技有限公司
* Licensed under the Apache License, Version 2.0 (the "License");
*    you may not use this file except in compliance with the License.
*    You may obtain a copy of the License at
*
*       http://www.apache.org/licenses/LICENSE-2.0
*
*    Unless required by applicable law or agreed to in writing, software
*    distributed under the License is distributed on an "AS IS" BASIS,
*    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*    See the License for the specific language governing permissions and
*    limitations under the License.
*******************************************************************************/
package com.qinyeit.serviceapp.entity;

import com.qinyeit.serviceapp.entity.enums.State;
import lombok.Builder;
import lombok.experimental.Tolerate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;

/**
 * ClassName: Warehouse <br/>
 * Function: 仓库管理 <br/>
 * date: 2018-11-07 11:52:00 <br/>
 *
 * @author liuwenjin
 * @version  1.0
 * @since JDK 1.8
 */
@Builder
@Entity
@Table(name="warehouses")
public class Warehouse extends MerchantGroupBaseEntity<Long> {

	private static final long serialVersionUID = 1L;

	// 编号 
    @Column(name="no", length = 300)
	private String no = null;

	// 名称 
    @Column(name="name", length = 300)
	private String name = null;

	// 状态 
    @Column(name="state", length = 300)
	private State state = State.NORMAL;

	// 系统库存 
    @Column(name="sys")
	private Boolean sys = true;
//
//    @Transient
//	private String stateText= "";

    @Tolerate
	public Warehouse() {
		
	}
    @Tolerate
	public Warehouse(Long id){
    	super.setId(id);
    }
	
	/**
	 * 获取编号
	 */
	public String getNo() {
		return this.no;
	}

    /**
     * 设置编号
     */
	public Warehouse setNo(String no) {
		this.no = no;
		return this;
	}

	/**
	 * 获取名称
	 */
	public String getName() {
		return this.name;
	}

    /**
     * 设置名称
     */
	public Warehouse setName(String name) {
		this.name = name;
		return this;
	}


	/**
	 * 获取系统库存
	 */
	public Boolean getSys() {
		return this.sys;
	}

    /**
     * 设置系统库存
     */
	public Warehouse setSys(Boolean sys) {
		this.sys = sys;
		return this;
	}

	public State getState() {
		return state;
	}

	public void setState(State state) {
		this.state = state;
	}

}
